package com.example.forum2.Controller;

import com.example.forum2.comment.AppResult;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestContro {
    @RequestMapping("/hello1")
    public String test(){
        return "aaaaa";
    }
    @RequestMapping("hello2")
public AppResult testException() throws Exception {
        throw new Exception("这是一个exception");
}


}
